export interface DigitalEmployeeCategory {
  position: string[];
  grade: string[];
  status: string[];
  method: string[];
}

export interface DigitalEmployeeData {
  [categoryName: string]: DigitalEmployeeCategory;
}

export interface DigitalEmployeeResponse {
  code: number;
  message: string;
  data: DigitalEmployeeData;
}

export interface DigitalEmployeesetResponse {
  code: number;
  message: string;
}

export interface PostRequestParams {
  id?: number; // 可选字段，带 id 为更新，不带 id 为新增
  name: string; // 用于检测名称是否重复
  icon: string; // 头像
  workflow: string; // 所属流程
  position: string; // 岗位
  duty: string; // 岗位职责
  level: string; // 级别
  description: string; // 描述
  run_status: string; // 运行状态
  implement_method: string; // 实现方式
}

export interface PostRequestsearch {
  Page: number;
  PageSize: number;
  name?: string;
  workflow?: string;
}

export interface ResultItem {
  id: number;
  name: string;
  icon: string;
  workflow: string;
  position: string;
  duty: string;
  level: string;
  description: string;
  run_status: string;
  implement_method: string;
  created_at: string; // 时间字符串
}

export interface searchResponse {
  code: number;
  message: string;
  data: {
    count: number; // 总记录数
    num_pages: number; // 总页数
    current_page: number; // 当前页码
    results: ResultItem[]; // 结果数组
  };
}


export interface typeResponse {
  code: number;
  message: string;
  data: string[]; 
}


export interface runDataResponse {
  code: number;
  message: string;
  data: {
    run_count: number;           // 执行次数
    success_ratio: number;       // 成功率
    time_savings: number;        // 节省时间
    performance_ratio: number;   // 性能比率
    digtals: number;
  };
}